import React from "react";
import { Tag } from 'antd-mobile';
import { HistoryCss } from './style';
function HistoryDom(props) {
    let { list, getSearchList, del } = props;
    return (
        <HistoryCss>
            <div className="title">历史记录</div>
            <div className="tag-container">
                {list.map((i, index) => {
                    return <Tag
                        key={index}
                        onChange={() => { getSearchList(i) }}
                    >
                        {i}
                    </Tag>
                })}
            </div>
            <p className="delHis" onClick={del}>清空历史记录</p>
        </HistoryCss>
    )
}
export default HistoryDom